<template>
	<view style="margin: 0 auto;">
		<swiper style="overflow: hidden; width:670rpx;height:180rpx;margin:0 auto;border-radius: 10rpx;" indicator-dots class="swiper" autoplay="true" interval="4000" circular>
			<swiper-item style="width:670rpx;height:180rpx;margin:0 auto;" >
				<image style="width:670rpx;height:180rpx;border-radius: 10rpx;" :src="swiperList" @click="gouyhj(index)"  mode="aspectFill" ></image>
			</swiper-item>
		</swiper>
	</view>
</template>

<script setup>
	import {reactive, ref,getCurrentInstance,onMounted} from 'vue'
	import {onLoad} from "@dcloudio/uni-app"
	const {proxy} = getCurrentInstance()
	const swiperList = ref([])
	onMounted(()=>{
		recommend()
	})
	const recommend =async(data)=>{
		var data = {pageNum: 1}
		const res = await proxy.$api.recommend(data)
		if(res.code==200){
			swiperList.value = res.data.carouselImages[0].picUrl
		}
	}
</script>

<style lang="scss">

</style>
